import { combineReducers } from 'redux';
import { createReducer } from 'utils';

import * as names from 'actions/names';

const error = createReducer('', {
  [names.DISPLAY_ERROR](state, action) {
    return action.error;
  },
  [names.CLEAR_ERROR]() {
    return '';
  },
});
export default combineReducers({
  error,
});
